//
//  ViewManager.m
//  HeartBeat
//
//  Created by karong on 2023/8/23.
//

#import "ViewManager.h"
#import "HBLoginController.h"
#import "HBFollowItemController.h"
#import "HBHistoryController.h"
#import "HBDiscoverItemController.h"
#import "HBSearchResultController.h"
#import "HBRankItemController.h"
#import "HBNovelDetailController.h"
#import "HBChapterController.h"
#import "HBWebController.h"
#import "HBTaskController.h"
#import "HBAlterController.h"
#import "HBTextFieldAlter.h"
#import "HBTextViewAlter.h"
#import "HBPickerAlter.h"
#import "HBActionSheet.h"
#import "HBUserInfoController.h"
#import "HBFeedbackController.h"
#import "HBNewVersionAlter.h"
#import "HBDeleteUserAlter.h"
#import "HBSettingController.h"
#import "HBLoginController.h"
#import "HBTaskSuccessController.h"
#import "HBBaseReadController.h"
#import "HBReadSubController.h"
#import "HBPayController.h"
#import "HBVipController.h"
#import "HBCoinController.h"
#import "HBMembershipController.h"
#import "HBReadGuideController.h"
#import "HBFollowController.h"
#import "HBDiscoverController.h"
#import "HBRankController.h"
#import "HBScoreController.h"
#import "HBReadEndController.h"

#import "HBCategoryController.h"

@implementation ViewManager
+ (UIViewController *)loginVC {
    UIStoryboard *storyboard = [self loginStoryboard];
    HBLoginController *targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBLoginController"];
    return targetVC;
}

+ (UIViewController *)followItemVCInController:(UIViewController *)vc {
    UIStoryboard *storyboard = [self followStoryboard];
    HBFollowItemController *targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBFollowItemController"];
    targetVC.delegate = vc;
    return targetVC;
}

+ (UIViewController *)historyVCInController:(UIViewController *)vc {
    UIStoryboard *storyboard = [self followStoryboard];
    HBHistoryController *targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBHistoryController"];
    targetVC.delegate = vc;
    return targetVC;
}

+ (UIViewController *)discoverItemVCWithChannel:(id)channel {
    UIStoryboard *storyboard = [self discoverStoryboard];
    HBDiscoverItemController *targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBDiscoverItemController"];
    targetVC.channel = channel;
    return targetVC;
}

+ (UIViewController *)channelVCWithChannel:(id)channel {
    UIStoryboard *storyboard = [self discoverStoryboard];
    HBCategoryController *targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBCategoryController"];
    targetVC.channel = channel;
    return targetVC;
}

+ (UIViewController *)searchResultVC {
    UIStoryboard *storyboard = [self discoverStoryboard];
    HBDiscoverItemController *targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBSearchResultController"];
    return targetVC;
}

+ (UIViewController *)rankItemVC {
    UIStoryboard *storyboard = [self discoverStoryboard];
    HBRankItemController *targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBRankItemController"];
    return targetVC;
}

+ (UIViewController *)readSubControllerVC {
    UIStoryboard *storyboard = [self readStoryboard];
    HBReadSubController *targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBReadSubController"];
    return targetVC;
}

+ (UIViewController *)payVC {
    UIStoryboard *storyboard = [self readStoryboard];
    HBPayController *targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBPayController"];
    return targetVC;
}

+ (UIViewController *)vipVC {
    UIStoryboard *storyboard = [self readStoryboard];
    HBVipController *targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBVipController"];
    return targetVC;
}

+ (UIViewController *)pushTaskVCInController:(UIViewController *)vc {
    UIStoryboard *storyboard = [self taskStoryboard];
    HBTaskController *targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBTaskController"];
    [vc.navigationController pushViewController:targetVC animated:YES];
    return targetVC;
}

+ (UIViewController *)pushNovelDetailVCWithNovel:(id)novel inController:(UIViewController *)vc {
    UIStoryboard *storyboard = [self novelStoryboard];
    HBNovelDetailController *targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBNovelDetailController"];
    targetVC.novel = novel;
    [vc.navigationController pushViewController:targetVC animated:YES];
    return targetVC;
}

+ (UIViewController *)showChapterVCWithNovel:(id)novel selectHandle:(回调一个对象)selectHandle inController:(UIViewController *)vc {
    UIStoryboard *storyboard = [self novelStoryboard];
    HBChapterController *targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBChapterController"];
    targetVC.novel = novel;
    targetVC.selectHandle = selectHandle;
    [vc presentViewController:targetVC animated:YES completion:nil];
    return targetVC;
}

+ (UIViewController *)pushWebVCWithUrl:(NSString *)url titleStr:(NSString *)titleStr inController:(UIViewController *)vc {
    UIStoryboard *storyboard = [self webStoryboard];
    HBWebController *targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBWebController"];
    targetVC.url = url;
    targetVC.titleStr = titleStr;
    targetVC.hideNav = KIsNullOrEmpty(titleStr);
    [vc.navigationController pushViewController:targetVC animated:YES];
    return targetVC;
}

+ (UIViewController *)pushUserInfoVCWithUser:(id)user inController:(UIViewController *)vc {
    UIStoryboard *storyboard = [self meStoryboard];
    HBUserInfoController *targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBUserInfoController"];
    targetVC.user = user;
    [vc.navigationController pushViewController:targetVC animated:YES];
    return targetVC;
}

+ (UIViewController *)pushFeedbackVCInController:(UIViewController *)vc {
    UIStoryboard *storyboard = [self meStoryboard];
    HBFeedbackController *targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBFeedbackController"];
    [vc.navigationController pushViewController:targetVC animated:YES];
    return targetVC;
}

+ (UIViewController *)pushSettingVCInController:(UIViewController *)vc {
    UIStoryboard *storyboard = [self meStoryboard];
    HBSettingController *targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBSettingController"];
    [vc.navigationController pushViewController:targetVC animated:YES];
    return targetVC;
}

+ (UIViewController *)showLoginVCInController:(UIViewController *)vc {
    HBLoginController *targetVC = (HBLoginController *)[self loginVC];
    targetVC.isModel = YES;
    targetVC.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
    targetVC.modalPresentationStyle = UIModalPresentationCustom;
    [vc presentViewController:targetVC animated:YES completion:nil];
    return targetVC;
}

+ (UIViewController *)pushReadVCWithNovel_id:(NSInteger)novel_id chapter_id:(NSInteger)chapter_id inController:(UIViewController *)vc {
    UIStoryboard *storyboard = [self readStoryboard];
    HBBaseReadController *targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBBaseReadController"];
    targetVC.novelID = novel_id;
    targetVC.chapterID = chapter_id;
    [vc.navigationController pushViewController:targetVC animated:YES];
    return targetVC;
}

+ (UIViewController *)pushCoinVCWithChapter:(id)chapter inController:(UIViewController *)vc {
    UIStoryboard *storyboard = [self meStoryboard];
    HBCoinController *targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBCoinController"];
    targetVC.chapter = chapter;
    [vc.navigationController pushViewController:targetVC animated:YES];
    return targetVC;
}

+ (UIViewController *)pushMembershipVCWithChapter:(id)chapter inController:(UIViewController *)vc {
    UIStoryboard *storyboard = [self meStoryboard];
    HBMembershipController *targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBMembershipController"];
    targetVC.chapter = chapter;
    [vc.navigationController pushViewController:targetVC animated:YES];
    return targetVC;
}

+ (UIViewController *)showReadGuideVCInController:(UIViewController *)vc {
    UIStoryboard *storyboard = [self readStoryboard];
    HBReadGuideController *targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBReadGuideController"];
    targetVC.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
    targetVC.modalPresentationStyle = UIModalPresentationCustom;
    [vc presentViewController:targetVC animated:YES completion:nil];
    return targetVC;
}

+ (UIViewController *)pushRankVCInController:(UIViewController *)vc {
    UIStoryboard *storyboard = [self discoverStoryboard];
    HBRankController *targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBRankController"];
    [vc.navigationController pushViewController:targetVC animated:YES];
    return targetVC;
}

+ (UIViewController *)pushScoreVCWithNovel:(id)novel inController:(UIViewController *)vc {
    UIStoryboard *storyboard = [self novelStoryboard];
    HBScoreController *targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBScoreController"];
    targetVC.novel = novel;
    [vc.navigationController pushViewController:targetVC animated:YES];
    return targetVC;
}

+ (UIViewController *)pushReadEndVCWithNovel:(id)novel inController:(UIViewController *)vc {
    UIStoryboard *storyboard = [self readStoryboard];
    HBReadEndController *targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBReadEndController"];
    targetVC.novel = novel;
    [vc.navigationController pushViewController:targetVC animated:YES];
    return targetVC;
}
#pragma mark Alter
+ (UIViewController *)showAlterWithTitle:(NSString *)title
                                 content:(NSString *)content
                                 confirm:(NSString *)confirm
                           confirmHandle:(空回调)confirmHandle
                                  cancel:(NSString *)cancel
                            cancelHandle:(空回调)cancelHandle
                            inController:(UIViewController *)vc {
    UIStoryboard *storyboard = [self alterStoryboard];
    HBAlterController * targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBAlterController"];
    targetVC.titleStr = KEmptyStr(title);
    targetVC.contentStr = KEmptyStr(content);
    targetVC.confirmStr = KEmptyStr(confirm);
    targetVC.cancelStr = KEmptyStr(cancel);
    targetVC.confirmHandle = confirmHandle;
    targetVC.cancelHandle = cancelHandle;
    targetVC.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
    targetVC.modalPresentationStyle = UIModalPresentationCustom;
    [vc presentViewController:targetVC animated:YES completion:nil];
    return targetVC;
}

+ (UIViewController *)showTipsAlterWithTitle:(NSString *)title
                                    content:(NSString *)content
                                    confirm:(NSString *)confirm
                            inController:(UIViewController *)vc {
    UIStoryboard *storyboard = [self alterStoryboard];
    HBAlterController * targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBTipsAlter"];
    targetVC.titleStr = KEmptyStr(title);
    targetVC.contentStr = KEmptyStr(content);
    targetVC.confirmStr = KEmptyStr(confirm);
    targetVC.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
    targetVC.modalPresentationStyle = UIModalPresentationCustom;
    [vc presentViewController:targetVC animated:YES completion:nil];
    return targetVC;
}

+ (UIViewController *)showUserAvatarWithSelectHandle:(回调一个数字)selectSexHandle inController:(UIViewController *)vc {
    UIStoryboard *storyboard = [self alterStoryboard];
    HBActionSheet * targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBUserAvatarActionSheet"];
    targetVC.selectSexHandle = selectSexHandle;
    targetVC.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
    targetVC.modalPresentationStyle = UIModalPresentationCustom;
    [vc presentViewController:targetVC animated:YES completion:nil];
    return targetVC;
}

+ (UIViewController *)showUserSexWithSelectHandle:(回调一个数字)selectSexHandle inController:(UIViewController *)vc {
    UIStoryboard *storyboard = [self alterStoryboard];
    HBActionSheet * targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBUserSexActionSheet"];
    targetVC.selectSexHandle = selectSexHandle;
    targetVC.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
    targetVC.modalPresentationStyle = UIModalPresentationCustom;
    [vc presentViewController:targetVC animated:YES completion:nil];
    return targetVC;
}

+ (UIViewController *)showLanguageWithSelectHandle:(回调一个数字)selectSexHandle inController:(UIViewController *)vc {
    UIStoryboard *storyboard = [self alterStoryboard];
    HBActionSheet * targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBLanguageActionSheet"];
    targetVC.selectSexHandle = selectSexHandle;
    targetVC.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
    targetVC.modalPresentationStyle = UIModalPresentationCustom;
    [vc presentViewController:targetVC animated:YES completion:nil];
    return targetVC;
}

+ (UIViewController *)showTextFieldAlterWithTitle:(NSString *)title
                                          content:(NSString *)content
                                   placeholderStr:(NSString *)placeholderStr
                                     maxWordCount:(NSInteger)maxWordCount
                                          confirm:(NSString *)confirm
                                    confirmHandle:(回调一个字符串)confirmHandle
                                           cancel:(NSString *)cancel
                                     inController:(UIViewController *)vc {
    UIStoryboard *storyboard = [self alterStoryboard];
    HBTextFieldAlter *targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBTextFieldAlter"];
    targetVC.titleStr = KEmptyStr(title);
    targetVC.contentStr = KEmptyStr(content);
    targetVC.confirmStr = KEmptyStr(confirm);
    targetVC.cancelStr = KEmptyStr(cancel);
    targetVC.maxWordCount = MAX(maxWordCount, content.length);
    targetVC.confirmHandle = confirmHandle;
    targetVC.placeholderStr = KEmptyStr(placeholderStr);
    targetVC.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
    targetVC.modalPresentationStyle = UIModalPresentationCustom;
    [vc presentViewController:targetVC animated:YES completion:nil];
    return targetVC;
}

+ (UIViewController *)showTextViewAlterWithTitle:(NSString *)title
                                         content:(NSString *)content
                                    maxWordCount:(NSInteger)maxWordCount
                                         confirm:(NSString *)confirm
                                   confirmHandle:(回调一个字符串)confirmHandle
                                          cancel:(NSString *)cancel
                                    inController:(UIViewController *)vc {
    UIStoryboard *storyboard = [self alterStoryboard];
    HBTextViewAlter *targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBTextViewAlter"];
    targetVC.titleStr = KEmptyStr(title);
    targetVC.contentStr = KEmptyStr(content);
    targetVC.confirmStr = KEmptyStr(confirm);
    targetVC.cancelStr = KEmptyStr(cancel);
    targetVC.maxWordCount = MAX(maxWordCount, content.length);
    targetVC.confirmHandle = confirmHandle;
    targetVC.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
    targetVC.modalPresentationStyle = UIModalPresentationCustom;
    [vc presentViewController:targetVC animated:YES completion:nil];
    return targetVC;
}

+ (UIViewController *)showPickerAlterWithTitle:(NSString *)title dataArray:(NSArray *)dataArray selectHandle:(回调一个对象)selectHandle inController:(UIViewController *)vc {
    UIStoryboard *storyboard = [self alterStoryboard];
    HBPickerAlter *targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBPickerAlter"];
    targetVC.titleStr = KEmptyStr(title);
    targetVC.selectHandle = selectHandle;
    targetVC.dataArray = dataArray;
    targetVC.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
    targetVC.modalPresentationStyle = UIModalPresentationCustom;
    [vc presentViewController:targetVC animated:YES completion:nil];
    return targetVC;
}

+ (UIViewController *)showImageAlterWithImageUrl:(NSString *)imageUrl inController:(UIViewController *)vc {
    UIStoryboard *storyboard = [self alterStoryboard];
    HBPickerAlter *targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBImageAlter"];
    targetVC.imageUrl = imageUrl;
    targetVC.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
    targetVC.modalPresentationStyle = UIModalPresentationCustom;
    [vc presentViewController:targetVC animated:YES completion:nil];
    return targetVC;
}

+ (UIViewController *)showNewVersionCodeAlterInController:(UIViewController *)vc {
    UIStoryboard *storyboard = [self meStoryboard];
    HBNewVersionAlter *targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBNewVersionAlter"];
    targetVC.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
    targetVC.modalPresentationStyle = UIModalPresentationCustom;
    [vc presentViewController:targetVC animated:YES completion:nil];
    return targetVC;
}

+ (UIViewController *)showDeleteUserAlterWithConfirmHandle:(空回调)confirmHandle inController:(UIViewController *)vc {
    UIStoryboard *storyboard = [self meStoryboard];
    HBDeleteUserAlter *targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBDeleteUserAlter"];
    targetVC.confirmHandle = confirmHandle;
    targetVC.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
    targetVC.modalPresentationStyle = UIModalPresentationCustom;
    [vc presentViewController:targetVC animated:YES completion:nil];
    return targetVC;
}

+ (UIViewController *)showTaskSuccessVCWithModel:(id)model inController:(UIViewController *)vc {
    UIStoryboard *storyboard = [self taskStoryboard];
    HBTaskSuccessController *targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBTaskSuccessController"];
    targetVC.model = model;
    targetVC.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
    targetVC.modalPresentationStyle = UIModalPresentationCustom;
    [vc presentViewController:targetVC animated:YES completion:nil];
    return targetVC;
}

+ (UIViewController *)showTaskRoleAlterAlterInController:(UIViewController *)vc {
    UIStoryboard *storyboard = [self taskStoryboard];
    HBBasePopoverController *targetVC = [storyboard instantiateViewControllerWithIdentifier:@"HBTaskRoleAlter"];
    targetVC.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
    targetVC.modalPresentationStyle = UIModalPresentationCustom;
    [vc presentViewController:targetVC animated:YES completion:nil];
    return targetVC;
}
#pragma mark - Storyboard
// 登錄页
+ (UIStoryboard *)loginStoryboard {
    return [UIStoryboard storyboardWithName:@"Login" bundle:nil];
}

// 追書页
+ (UIStoryboard *)followStoryboard {
    return [UIStoryboard storyboardWithName:@"Follow" bundle:nil];
}
// 發現页
+ (UIStoryboard *)discoverStoryboard {
    return [UIStoryboard storyboardWithName:@"Discover" bundle:nil];
}

// 福利页
+ (UIStoryboard *)taskStoryboard {
    return [UIStoryboard storyboardWithName:@"Task" bundle:nil];
}

// 我的
+ (UIStoryboard *)meStoryboard {
    return [UIStoryboard storyboardWithName:@"Me" bundle:nil];
}

// 小说详情
+ (UIStoryboard *)novelStoryboard {
    return [UIStoryboard storyboardWithName:@"Novel" bundle:nil];
}

// 阅读器
+ (UIStoryboard *)readStoryboard {
    return [UIStoryboard storyboardWithName:@"Read" bundle:nil];
}

// web
+ (UIStoryboard *)webStoryboard {
    return [UIStoryboard storyboardWithName:@"Web" bundle:nil];
}

// alter
+ (UIStoryboard *)alterStoryboard {
    return [UIStoryboard storyboardWithName:@"Alter" bundle:nil];
}
#pragma mark - Root
// 获取当前视图
+ (UIViewController *)currentViewController {
    UIViewController *resultVC;
    resultVC = [self _topViewController:[self rootViewController]];
    while (resultVC.presentedViewController) {
        resultVC = [self _topViewController:resultVC.presentedViewController];
    }
    return resultVC;
}

+ (UIViewController *)rootViewController {
    return [UIApplication sharedApplication].keyWindow.rootViewController;
}

+ (UIViewController *)_topViewController:(UIViewController *)vc {
    if ([vc isKindOfClass:[UINavigationController class]]) {
        return [self _topViewController:[(UINavigationController *)vc topViewController]];
    } else if ([vc isKindOfClass:[UITabBarController class]]) {
        return [self _topViewController:[(UITabBarController *)vc selectedViewController]];
    } else {
        return vc;
    }
    return nil;
}

+ (void)viewControllJumpWithjumpType:(HBControllerJumpType)jumpType vc:(HBBaseController *)vc dataDic:(NSDictionary *)dataDic {
    switch (jumpType) {
        case HBControllerJumpTypeVip:
        {
            [ViewManager pushMembershipVCWithChapter:0 inController:vc];
        }
            break;
        case HBControllerJumpTypeCoin:
        {
            [ViewManager pushCoinVCWithChapter:0 inController:vc];
        }
            break;
        case HBControllerJumpTypeFollow:
        {
            vc.tabBarController.selectedIndex = 0;
            HBFollowController * target = vc.tabBarController.viewControllers.firstObject;
            if ([target isKindOfClass:NSClassFromString(@"HBBaseNavigationController")]) {
                HBBaseNavigationController * nav = target;
                target = nav.viewControllers.firstObject;
            }
            if ([target isKindOfClass:NSClassFromString(@"HBFollowController")]) {
                [target turn2Follow];
                [vc.navigationController popToRootViewControllerAnimated:YES];
            }
        }
            break;
        case HBControllerJumpTypeFemale:
        {
            vc.tabBarController.selectedIndex = 1;
            HBDiscoverController * target = vc.tabBarController.viewControllers.firstObject;
            if ([target isKindOfClass:NSClassFromString(@"HBBaseNavigationController")]) {
                HBBaseNavigationController * nav = target;
                target = nav.viewControllers.firstObject;
            }
            if ([target isKindOfClass:NSClassFromString(@"HBDiscoverController")]) {
                [target turn2Female];
                [vc.navigationController popToRootViewControllerAnimated:YES];
            }
        }
            break;
        case HBControllerJumpTypeMale:
        {
            vc.tabBarController.selectedIndex = 1;
            HBDiscoverController * target = vc.tabBarController.viewControllers.firstObject;
            [target turn2Male];
            [vc.navigationController popToRootViewControllerAnimated:YES];
        }
            break;
        case HBControllerJumpTypeUser:
        {
            [self pushUserInfoVCWithUser:appUserCenter inController:vc];
        }
            break;
        case HBControllerJumpTypeForYou:
        {
            vc.tabBarController.selectedIndex = 1;
            [vc.navigationController popToRootViewControllerAnimated:YES];
        }
            break;
        case HBControllerJumpTypeNovel:
        {
            HBNovelModel * novel = [HBNovelModel new];
            novel.book_id = [dataDic[@"book_id"] integerValue];
            [ViewManager pushNovelDetailVCWithNovel:novel inController:vc];
        }
            break;
        case HBControllerJumpTypeUrl:
        {
            NSString * url = dataDic[@"jump_url"];
            [[UIApplication sharedApplication] openURL:[NSURL URLWithString:KEmptyStr(url)] options:@{} completionHandler:nil];
        }
            break;
        case HBControllerJumpTypeRankMale:
        case HBControllerJumpTypeRankFemale:
        {
            [ViewManager pushRankVCInController:vc];
        }
            break;
        default:
            
            break;
    }
}
@end
